﻿Imports Mysoft.Map.Business

Partial Public Class SiteManager_XmlHttp
    Inherits Mysoft.Map.Application.Security.AppPage

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

        If Session("UserGUID") Is Nothing OrElse Session("UserGUID") = "" OrElse Session("MySessionState") Is Nothing OrElse Session("MySessionState") = "" Then
            MyBase.Response.ContentType = "Text/HTML"
            MyBase.Response.Clear()
            MyBase.Response.Write("服务器超时")
            MyBase.Response.End()
            Return
        End If

        Dim action As String = Request("Action")
        Dim result As String

        Select Case action.ToUpper()
            Case "SaveSite".ToUpper
                Dim ywonlyflag As String = Server.UrlDecode(Request("ywonlyflag"))
                Dim xml As String = Server.UrlDecode(Request("MapXml"))
                result = SiteSettingManage.SaveSite(ywonlyflag, xml)
            Case "VerifySiteIsUsed".ToUpper
                Dim ywonlyflag As String = Request("ywonlyflag")
                result = SiteSettingManage.VerifySiteIsUsed(ywonlyflag)
            Case "GetNewGUID".ToUpper
                result = SiteSettingManage.GetNewGUID()
            Case Else
                result = String.Empty
        End Select

        MyBase.Response.ContentType = "text/HTML"
        MyBase.Response.Clear()
        MyBase.Response.Write(result)
        MyBase.Response.End()

    End Sub

End Class